<?
require("config.php");

$location_status .= "| Enquire";
$show_backnav = "user_menu";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

   $Query="delete from $table where id=$id";

   myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=55");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
	code, 
	username, 
	password, 
	name,
	tel,
    fax,
	email,
	alert01,
	alert02,
	alert03,
	alert04,
	alert05,
	id 
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$Code=$r[0][0];
$Username=$r[0][1];
$Password=$r[0][2];
$Name=$r[0][3];
$Tel=$r[0][4];
$Fax=$r[0][5];
$Email=$r[0][6];
$Alert01=$r[0][7];
$Alert02=$r[0][8];
$Alert03=$r[0][9];
$Alert04=$r[0][10];
$Alert05=$r[0][11];
$Id=$r[0][12];

require($rela_path . "inc/header.php");

?>



<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="edit">
<input name="id" type="hidden" value="<?print($id)?>">




<table width="95%" border="0" align="center">
  <tr> 
    <td width="579" valign="top" height="127">
      <br>
      <br>
      <table border="0" cellspacing="0" cellpadding="2">
        <tr> 
          <td width="137" class="tdheader">Code :</td>
          <td width="455"><?print($Code)?></td>
        </tr>
        <tr> 
          <td width="137" class="tdheader">Username :</td>
          <td width="455"><?print($Username)?></td>
        </tr>
        <tr> 
          <td width="137" class="tdheader">Password :</td>
          <td width="455"><?print($Password)?></td>
        </tr>
        <tr> 
          <td width="137" height="3" class="tdheader">Name :</td>
          <td width="455" height="3"><?print($Name)?></td>
        </tr>
        <tr> 
          <td width="137" class="tdheader">Tel :</td>
          <td width="455"><?print($Tel)?></td>
        </tr>
        <tr> 
          <td width="137" class="tdheader">Fax :</td>
          <td width="455"><?print($Fax)?></td>
        </tr>
        <tr> 
          <td width="137" class="tdheader">Email :</td>
          <td width="455"><?print($Email)?></td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>

  </tr>
</table>
<br>
<br>
<br>
</form>
<?
require($rela_path . "inc/footer.php");
?>
